import { isEmpty } from '../../components/Flow/utils/collectionUtils'

export function convertMapToRow(mapData) {
  let convertedArray = []
  if (isEmpty(mapData)) {
    return mapData
  }

  for (let key in mapData) {
    convertedArray.push({
      key: key,
      value: mapData[key],
    })
  }

  return convertedArray
}
